package edu.gdkm.abstractdemo;
//继承抽象类，必须实现父类的抽象方法，除非你也是一个抽象类
public class Circular_cylinder extends Three_dimension{

    public Circular_cylinder(double r, double h) {
        super(r, h);
    }

    @Override
    public double superficial_area() {
        return Math.PI*r*r*2+2*Math.PI*r*h;
    }

    @Override  //注解
    public double volume() {
        return Math.PI*r*r*h;
    }
}
